<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/5/22
  Time: 14:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>TopBar</title>
    <meta charset="utf-8">
    <!--[if IE]>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <![endif]-->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <!--[if lt IE 9]>
    <script src="${pageContext.request.contextPath}/foreground/js/respond.js"></script>
    <![endif]-->
    <!-- Bootstrap Core CSS -->
    <link href="${pageContext.request.contextPath}/foreground/css/bootstrap.css" rel="stylesheet" type="text/css">
    <!-- Icon fonts -->
    <link href="${pageContext.request.contextPath}/foreground/fonts/font-awesome/css/font-awesome.min.css" rel="stylesheet"
          type="text/css">
    <link href="${pageContext.request.contextPath}/foreground/fonts/flaticons/flaticon.css" rel="stylesheet" type="text/css">
    <link href="${pageContext.request.contextPath}/foreground/fonts/glyphicons/bootstrap-glyphicons.css" rel="stylesheet"
          type="text/css">
    <!-- Google fonts -->
    <link href="https://fonts.googleapis.com/css?family=Lato:400,800" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Baloo+Thambi" rel="stylesheet">
    <!-- Style CSS -->
    <link href="${pageContext.request.contextPath}/foreground/css/style.css" rel="stylesheet">
    <!-- Plugins CSS -->
    <link rel="stylesheet" href="${pageContext.request.contextPath}/foreground/css/plugins.css">
    <!-- Color Style CSS -->
    <link href="${pageContext.request.contextPath}/foreground/styles/maincolors.css" rel="stylesheet">
    <!-- Core JavaScript Files -->
    <script src="${pageContext.request.contextPath}/foreground/js/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/foreground/js/bootstrap.min.js"></script>
    <!-- Main Js -->
    <script src="${pageContext.request.contextPath}/foreground/js/main.js"></script>
    <!-- Contact form -->
    <script src="${pageContext.request.contextPath}/foreground/js/contact.js"></script>
    <!--Other Plugins -->
    <script src="${pageContext.request.contextPath}/foreground/js/plugins.js"></script>
    <!-- Prefix free CSS -->
    <script src="${pageContext.request.contextPath}/foreground/js/prefixfree.js"></script>
    <!--Mail Chimp validator -->
    <script src='${pageContext.request.contextPath}/foreground/js/mc-validate.js'></script>
    <!-- Open street maps-->
    <script src="${pageContext.request.contextPath}/foreground/js/map.js"></script>
</head>
<body>
<!-- 最上面的橙色导航栏模块-->
<nav class="navbar navbar-custom navbar-fixed-top">
    <div class="container">
        <!-- 顶部导航栏中间的商标 -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-brand-centered">
                <i class="fa fa-bars"></i>
            </button>
            <div class="navbar-brand navbar-brand-centered page-scroll">
                <img src="${pageContext.request.contextPath}/foreground/img/logo1.png"
                     style="position: absolute; margin: 0 auto;-webkit-user-drag: none;"
                     class="img-responsive"
                     alt="小狗.logo"
                     onclick="scrollToTop()"
                >
            </div>
        </div>

        <div class="collapse navbar-collapse" id="navbar-brand-centered">
            <!-- 顶部导航栏商标左边的三个按钮 -->
            <ul class="nav navbar-nav">
                <li class="<c:if test="${empty pageContext.request.servletPath or pageContext.request.servletPath == '/index.jsp'}">active</c:if>">
                    <a href="index.jsp">主页</a>
                </li>
                <li class="<c:if test="${param.page == 'adopt'}">active</c:if>">
                    <a href="allAnimalParentType?tyParentId=0&page=adopt">领养</a>
                </li>
                <li class="<c:if test="${param.page == 'help'}">active</c:if>">
                    <a href="help?page=help">求助</a>
                </li>
            </ul>
            <!-- 顶部导航栏商标右边的三个按钮 -->
            <ul class="nav navbar-nav navbar-right">
                <li class="<c:if test="${param.page == 'offer'}">active</c:if>">
                    <a href="findAllDonationType?page=offer">捐助</a>
                </li>
                <li class="<c:if test="${param.page == 'message'}">active</c:if>">
                    <a href="findAllMessage?page=message&publish=1">公告</a>
                </li>
                <li class="<c:if test="${param.page == 'user-login'}">active</c:if>">
                    <a href="user-login?page=user-login">用户登录</a>
                </li>
            </ul>
        </div>
    </div>
</nav>
<script>
    function scrollToTop(){
        window.scrollTo({ top: 0, behavior: "smooth" });
    }
</script>
</body>
</html>